package com.coc.ofmylistener.listenner;

import com.coc.ofmylistener.event.EventPublisher;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.beans.factory.annotation.Qualifier;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;

@Controller
@RequestMapping("/publish")
public class TestController {

    @Autowired
    @Qualifier("simpleEventPublisher")
    private EventPublisher eventPublisher;

    @RequestMapping(value = "/test",method = RequestMethod.GET)
    public void test () {

        System.out.println("12312");

        User u  = new User();
        u.setTt("publish");
        eventPublisher.publish(u);

    }



}
